<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFangattrsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('fangattrs', function (Blueprint $table) {
            $table->bigIncrements("id");
            $table->unsignedInteger("pid")->default(0)->comment("上级ID");
            $table->string("name",50)->default("")->comment("属性名称");
            $table->string("icon",200)->default("")->comment("图标");
            $table->string("field_name",50)->default("")->comment("字段名");
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('fangattrs');
    }
}
